﻿<hr/><?php
function htmlchar($s){
  return '&#'.$s.';';
}

function testlang($lang){
	echo$lang[0],'<br/>',implode(array_map('htmlchar',$lang[1]));
}

//testlang($languages['fr']);




/*$currency_sa=array(
	'₲'=>8370; 
);*/

//'€'=>128,

function waerd($s){
	/*include'php/languages.php';
	foreach(array_keys($languages) as $lkey){
		$ic=count($languages[$lkey][1]);
		for($i=0;$i<$ic;++$i){
		//$languages[$lkey][1] as $code)
			//echo$char;
			//echo substr($languages[$lkey][0].$i,1);
			$s=str_replace(substr($languages[$lkey][0].$i,1),'&#'.$languages[$lkey][1][$i].';',$s);
			++$i;
		}
	}*/
	
	echo$s;
/*return
str_replace('æ','&#145;',
str_replace('doc','testje',
str_replace('doc','testje',
str_replace(';rho','try',
str_replace(' ;kappa ','&#954;',
str_replace(' ;lambda ','&#955;',
str_replace(' ;rho ','&#965;',
str_replace(';O/','&#216;',
str_replace(';right','&rarr;',
str_replace(';_','<sub>',
str_replace('_;','</sub>',
str_replace(' ;* ','<sup>',
str_replace(' ;* ','<sup>',
str_replace(' *; ','</sup>',
str_replace(' ;code ','<!--<code>',
str_replace(' code; ','</code>//-->',
str_replace('\n','<br/>',
str_replace(';;;','&nbsp;&nbsp;&nbsp;&nbsp;',
$s))))))))))))))));
*/
}



if(!$db)include'plugin/base/.db/connect.php';

$table=$site.'_'.$tag.'_articles';
$cols=array('title','content');
$empty='no articles in collection';
include'plugin/base/.db/query/rows.php';

foreach($rows as $row){
echo '<h1>',waerd($row['title']),'</h1>';


?><?php 

$content=$row['content'];

echo waerd($content);
?><?php 

}

?>